public class SelectSort {
	public static void main(String[] args) {
		//简单选择排序
		int[] ar = {99, 56, 73, 58, 77};
		for (int i = 0; i < ar.length; i++) {
			int a = ar[i];
			int b = i;
			for (int j = i + 1; j < ar.length; j++) {
				if (ar[j] < a) {
					a = ar[j];
					b = j;
				}
			}
			ar[b] = ar[i];
			ar[i] = a;
		}
		for (int i = 0;i<ar.length;i++){
			System.out.println(ar[i]);
		}
	}
}
